import request from '@/api/request'

//获取列表
export const getList = (data: any, params: any) => {
    return request({
        url: '/generator',
        method: 'get',
        data: data,
        params: params
    })
}
//删除通过ID
export const getById = (id:number)=>{
    return request({
        url:'/generator/'+id,
        method: 'get'
    })
}

//添加
export const add = (data:any)=>{
    return request({
        url: '/generator',
        method: 'post',
        data: data
    })
}

//删除通过ID
export const removeById = (id:number)=>{
    return request({
        url:'/generator/'+id,
        method: 'delete'
    })
}
//修改
export const modify = (data:any)=>{
    return request({
        url: '/generator',
        method: 'put',
        data: data
    })
}
//显示
export const show= (id:number)=>{
    return request({
        url: '/generator/show/'+id,
        method: 'get',
    })
}